www.gusucode.com > 地方成人教育中心整站源代码 1 > 地方成人教育中心整站源代码 1.0/manage/Admin_ProductEdit.asp
<!--#include file="conn.asp"--> <!--#include file="chkuser.asp"--> <!--#include file="FCKeditor/fckeditor.asp" --> <!--#include file="Function/Function_Product.asp"--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta name="copyright" content="Copyright 2008 dananshan.com" /> <meta name="Author" content="闪电文章管理系统技术支持---www.dananshan.com" /> <meta name="Keywords" content="闪电文章管理系统文章管理系统" /> <meta name="Description" content="闪电文章管理系统文章管理系统" /> <title>添加服务</title> <link href="style.css" rel="stylesheet" type="text/css" /> <script src="../js/check.js" type="text/javascript"></script> </head> <body> <% '========判断是否具有管理权限 if Instr(session("AdminPower"),"|43,")=0 then response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>") response.end else if Request.QueryString ("Form")="Edit" then call Edit_Content() else call Add_Content() end if end if %> </body> </html> <% Function Add_Content() response.Write "<form method='post' action='?action=add'>" response.Write "<div id='frame_Toolbar' class='toolbarBg'>" response.Write "<a href='javascript:self.history.back();' class='icoBtn_ct'><span class='btnIco btnBack'></span><span class='btnTxt'>返回</span></a>" response.Write "<a href='javascript:self.location.reload();' class='icoBtn_ct'><span class='btnIco btnReload'></span><span class='btnTxt'>刷新</span></a><span class='split ftSplit' ></span>" response.Write "<div id='guide' class='light_orange'>请填写服务信息!</div>" response.Write "<div class='pageInfo right light_gray'></div>" response.Write "</div>" response.Write "<table class='cTable_2 table'>" response.Write "<tr class='cTitle toolbarBg'>" response.Write "<td width='15%'><div>添加服务</div></td>" response.Write "<td width='85%'> </td></tr>" response.Write "<tr>" response.Write "<td class='tRight'>服务名称:</td>" response.Write "<td>" response.Write "<input name='ProductName' type='text' id='ProductName' style='width:250px;' onBlur='check_ProductName(this.value);'/>" response.Write "<input name='IsShow' type='checkbox' id='IsShow' value='checkbox' checked='checked' />发布 <span id='span_ProductName'>请填写服务名称</span>" response.Write "</td></tr>" response.Write "<tr>" response.Write "<td class='tRight'>所属类别:</td>" response.Write "<td>" response.Write "<select style='width:250px;' name='Sort' onBlur='check_ProductSort(this.value);'>" response.Write "<option value='0' selected='selected'>=============请选择类别=============</option>" sql="Select * From Idea_ProductSort order by id" set rs=idea.exec(sql,1) do while not rs.eof response.Write "<option value='"&rs("ID")&"'>"&rs("SortName")&"</option>" rs.movenext loop rs.close set rs=nothing response.Write "</select> <span id='span_ProductSort'>请选择服务类别</span>" response.Write "</td></tr>" response.Write "<tr>" response.Write "<td class='tRight'>服务编号:</td>" response.Write "<td>" response.Write "<input name='ProductID' type='text' id='ProductID' style='width:250px;' onBlur='check_ProductID(this.value);'/> <span id='span_ProductID'>请填写服务编号</span>" response.Write "</td></tr>" response.Write "<tr>" response.Write "<td class='tRight'>服务价格:</td>" response.Write "<td>" response.Write "<input name='Price' type='text' id='Price' style='width:250px;' onBlur='check_Price(this.value);'/> <span id='span_Price'>请填写服务价格</span>" response.Write "</td></tr>" response.Write "<tr>" response.Write "<td class='tRight'>服务图片:</td>" response.Write "<td>" response.Write "<input name='spic' id='spic' type='text' style='width:100px;'> " response.Write "<input name='lpic' id='lpic' type='text' style='width:100px;'> " response.Write "<input name='pic' id='pic' type='text' style='width:100px;'> " response.Write "<iframe src='up/upload.asp?Type=Pic&Class=Product' scrolling='no' topmargin='0' width='275' height='24' marginwidth='0' marginheight='0' frameborder='0' align='center'></iframe>" response.Write "</td></tr>" response.Write "<tr>" response.Write "<td valign='top' class='tRight'>服务说明:</td>" response.Write "<td>" Dim oFCKeditor1 Set oFCKeditor1 = New FCKeditor oFCKeditor1.BasePath="fckeditor/" oFCKeditor1.ToolbarSet="Idea" oFCKeditor1.Width="550" oFCKeditor1.Height="300" oFCKeditor1.Value="请填写相关信息!" oFCKeditor1.Create "Content1" response.Write "</td>" response.Write "</tr>" response.Write "</table>" response.Write "<div id='cEndToolbar' class='toolbarBg'>" response.Write "<div class='caButCase'>" response.Write "<input type='submit' name='Btn_OK' id='Btn_OK' disabled='disabled' value='确认添加' class='button'> " response.Write "<input type='reset' name='Submit2' value='清空重填' class='button'>" response.Write "</div>" response.Write "</div>" response.Write "</form>" End Function Function Edit_Content() ID=trim(request("ID")) if ID<>"" and IsNumeric(ID) then sql="select * from Idea_Product where ID="&ID set rs=idea.exec(sql,1) do while not rs.eof response.Write "<form method='post' action='?Action=update&ID="&ID&"'>" response.Write "<div id='frame_Toolbar' class='toolbarBg'>" response.Write "<a href='javascript:self.history.back();' class='icoBtn_ct'><span class='btnIco btnBack'></span><span class='btnTxt'>返回</span></a>" response.Write "<a href='javascript:self.location.reload();' class='icoBtn_ct'><span class='btnIco btnReload'></span><span class='btnTxt'>刷新</span></a><span class='split ftSplit' ></span>" response.Write "<div id='guide' class='light_orange'>请填写服务信息!</div>" response.Write "<div class='pageInfo right light_gray'></div>" response.Write "</div>" response.Write "<table class='cTable_2 table'>" response.Write "<tr class='cTitle toolbarBg'>" response.Write "<td width='15%'><div>编辑服务</div></td>" response.Write "<td width='85%'> </td></tr>" response.Write "<tr>" response.Write "<td class='tRight'>服务名称:</td>" response.Write "<td>" response.Write "<input name='ProductName' type='text' id='ProductName' style='width:250px;' value='"&rs("ProductName")&"' onBlur='check_ProductName(this.value);'/>" if rs("IsShow")=true then response.Write "<input name='IsShow' type='checkbox' id='IsShow' value='checkbox' checked='checked' />发布 <span id='span_ProductName'>请填写服务名称</span>" else response.Write "<input name='IsShow' type='checkbox' id='IsShow' value='checkbox' />发布 <span id='span_ProductName'>请填写服务名称</span>" end if response.Write "</td></tr>" response.Write "<tr>" response.Write "<td class='tRight'>所属类别:</td>" response.Write "<td>" response.Write "<select style='width:250px;' name='Sort' onBlur='check_ProductSort(this.value);'>" response.Write "<option value='0' selected='selected'>=============请选择类别=============</option>" sql1="Select * From Idea_ProductSort order by id" set rs1=idea.exec(sql1,1) do while not rs1.eof response.Write "<option value='"&rs1("ID")&"'" if cint(rs1("ID"))=rs("SortID") then response.Write " selected='selected'" end if response.Write ">"&rs1("SortName")&"</option>" rs1.movenext loop rs1.close set rs1=nothing response.Write "</select> <span id='span_ProductSort'>请选择服务类别</span>" response.Write "</td></tr>" response.Write "<tr>" response.Write "<td class='tRight'>服务编号:</td>" response.Write "<td>" response.Write "<input name='ProductID' type='text' id='ProductID' style='width:250px;' value='"&rs("ProductID")&"' onBlur='check_ProductID(this.value);'/> <span id='span_ProductID'>请填写服务编号</span>" response.Write "</td></tr>" response.Write "<tr>" response.Write "<td class='tRight'>服务价格:</td>" response.Write "<td>" response.Write "<input name='Price' type='text' id='Price' style='width:250px;' value='"&rs("Price")&"' onBlur='check_Price(this.value);'/> <span id='span_Price'>请填写服务价格</span>" response.Write "</td></tr>" response.Write "<tr>" response.Write "<td class='tRight'>服务图片:</td>" response.Write "<td>" response.Write "<input name='spic' id='spic' type='text' value='"&rs("sProductPic")&"' style='width:100px;'> " response.Write "<input name='lpic' id='lpic' type='text' value='"&rs("lProductPic")&"' style='width:100px;'> " response.Write "<input name='pic' id='pic' type='text' value='"&rs("ProductPic")&"' style='width:100px;'> " response.Write "<iframe src='up/upload.asp?Type=Pic&Class=Product' scrolling='no' topmargin='0' width='275' height='24' marginwidth='0' marginheight='0' frameborder='0' align='center'></iframe>" response.Write "</td></tr>" response.Write "<tr>" response.Write "<td valign='top' class='tRight'>服务说明:</td>" response.Write "<td>" Dim oFCKeditor1 Set oFCKeditor1 = New FCKeditor oFCKeditor1.BasePath="fckeditor/" oFCKeditor1.ToolbarSet="Idea" oFCKeditor1.Width="550" oFCKeditor1.Height="300" oFCKeditor1.Value=rs("Introduce") oFCKeditor1.Create "Content1" response.Write "</td>" response.Write "</tr>" response.Write "</table>" response.Write "<div id='cEndToolbar' class='toolbarBg'>" response.Write "<div class='caButCase'>" response.Write "<input type='submit' name='Btn_OK' id='Btn_OK' value='确认修改' class='button'> " response.Write "<input type='reset' name='Submit2' value='清空重填' class='button'>" response.Write "</div>" response.Write "</div>" response.Write "</form>" rs.movenext loop rs.close set rs=nothing end if End Function %>